/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jjrealestatevisitor.structure;

import java.util.ArrayList;
import jjrealestatevisitor.visitor.Visitable;
import jjrealestatevisitor.visitor.Visitor;

/**
 *
 * @author jochemsiegel
 */
public class House implements Visitable {
    private String postalCode;
    private int houseNumber;
    private String houseNumberExtension;
    private ArrayList rooms;

    public House (String postalCode, int houseNumber, String houseNumberExtension) {
        this.postalCode = postalCode;
        this.houseNumber = houseNumber;
        this.houseNumberExtension = houseNumberExtension;
        this.rooms = new ArrayList();
    }

    public int getHouseNumber() {
        return houseNumber;
    }

    public String getHouseNumberExtension() {
        return houseNumberExtension;
    }

    public String getPostalCode() {
        return postalCode;
    }

    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }

    public void setHouseNumber(int houseNumber) {
        this.houseNumber = houseNumber;
    }

    public void setHouseNumberExtension(String houseNumberExtension) {
        this.houseNumberExtension = houseNumberExtension;
    }

    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    public void addRoom(Room room) {
        rooms.add(room);
    }

    public ArrayList getRooms() {
        return rooms;
    }

}
